package com.candy.util;

import com.candy.dao.AccountDao;
import com.candy.service.AccountService;
import com.candy.service.impl.AccountServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Client {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("beans.xml");
        AccountService accountService= (AccountService) ac.getBean("accountService");
        System.out.println(accountService);
        accountService.saveAccount();
       AccountDao accountDao= (AccountDao) ac.getBean("accountDao");
        System.out.println(accountDao);
    }
}
